const { sequelize, DataTypes } = require('../../utill/getSequelize')

//课程教学进度安排表
const Course_schedule = sequelize.define('Course_schedule', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
  },



  unit_knowledge_name: {//单元知识表id
    type: DataTypes.STRING,
    // allowNull: false,
  },




  all_time: {//总学时
    type: DataTypes.INTEGER,
    // allowNull: false,
  },


  theory_time: {//理论学时
    type: DataTypes.INTEGER,
    // allowNull: false,
  },


  practice_time: {//实践学时
    type: DataTypes.INTEGER,
    // allowNull: false,
  },

  t_user_and_a_c_s_id: {
    type: DataTypes.INTEGER,
    allowNull: false,
  },


});


//同步模型和数据库表
(async () => {
  try {
    await sequelize.sync({ force: false });
    console.log('All models were synchronized successfully.');
  } catch (error) {
    console.log(error);
  }

})();

//提供出去
module.exports = { Course_schedule };